from django.db import models
from osmp.monitor.models import Monitor
from django.contrib.auth.models import User

class Report(models.Model):
    '''user extra profile table'''
    rname = models.CharField(max_length=50)
    source = models.CharField(max_length=50)
    mid = models.ForeignKey(Monitor, blank=True)
    type = models.BooleanField()

    def __unicode__(self):
        return "%s" % self.rname

    def __str__(self):
        return "%s" % self.rname

class ReportReceive(models.Model):
    rid = models.ForeignKey(Report)
    uid = models.ForeignKey(User)
    freq = models.IntegerField()
    #sendtime = models.CharField(max_length=20)

    def __unicode__(self):
        return "RRid: " + "%s" % self.id

    def __str__(self):
        return "RRid: "+ "%s" % self.id
